<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试案例 - 一体化作战平台</title>
    <!-- 引入Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- 引入Font Awesome -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <!-- Tailwind配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#0066cc',
                        secondary: '#0099cc',
                        success: '#009966',
                        warning: '#ff9900',
                        danger: '#cc3300',
                        neutral: {
                            100: '#f5f7fa',
                            200: '#e4e7ed',
                            300: '#c0c4cc',
                            400: '#909399',
                            500: '#606266',
                            600: '#303133',
                            700: '#1f2937',
                        }
                    },
                    fontFamily: {
                        sans: ['Inter', 'system-ui', 'sans-serif'],
                    },
                    boxShadow: {
                        'card': '0 2px 8px rgba(0, 0, 0, 0.08)',
                        'dropdown': '0 4px 16px rgba(0, 0, 0, 0.12)',
                    }
                },
            }
        }
    </script>
    
    <!-- 自定义工具类 -->
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
            }
            .transition-all-300 {
                transition: all 300ms ease-in-out;
            }
            .lazy-img {
                loading: lazy;
                transition: opacity 0.3s ease-in-out;
            }
            .lazy-img[data-loaded="false"] {
                opacity: 0;
            }
            .lazy-img[data-loaded="true"] {
                opacity: 1;
            }
        }
    </style>
    
    <style>
        .transition-all-300 {
            transition: all 300ms ease-in-out;
        }
        .scrollbar-hide {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        .scrollbar-hide::-webkit-scrollbar {
            display: none;
        }
        
        /* 优先级徽章样式 */
        .badge-priority-high {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            border-radius: 9999px;
            background-color: #fee2e2;
            color: #dc2626;
        }
        .badge-priority-medium {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            border-radius: 9999px;
            background-color: #fef3c7;
            color: #d97706;
        }
        .badge-priority-low {
            padding: 0.25rem 0.5rem;
            font-size: 0.75rem;
            border-radius: 9999px;
            background-color: #d1fae5;
            color: #059669;
        }
        
        /* 标签页样式 */
        .tab-button {
            transition: all 0.3s ease;
        }
        .tab-button.active {
            font-weight: 600;
        }
        .tab-button:hover {
            background-color: rgba(0, 102, 204, 0.05);
        }
        
        /* 表单获取焦点样式 */
        input:focus, select:focus, textarea:focus {
            outline: none;
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
        }
    </style>
</head>
<body class="bg-neutral-100 font-sans text-neutral-600 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm fixed top-0 left-0 right-0 z-50">
        <div class="flex items-center justify-between px-4 py-3">
            <!-- Logo和标题 -->
            <div class="flex items-center space-x-3">
                <button id="menuToggle" class="md:hidden p-2 rounded-md hover:bg-neutral-100 transition-all-300">
                    <i class="fa fa-bars text-neutral-600"></i>
                </button>
                <div class="flex items-center space-x-2">
                    <div class="w-10 h-10 bg-primary rounded-md flex items-center justify-center text-white">
                        <i class="fa fa-bank text-xl"></i>
                    </div>
                    <h1 class="text-xl font-bold text-neutral-700 hidden md:block">一体化作战平台</h1>
                    <h1 class="text-lg font-bold text-neutral-700 md:hidden">研发交付平台</h1>
                </div>
            </div>
            
            <!-- 搜索框 -->
            <div class="hidden md:flex relative flex-1 max-w-md mx-4">
                <input type="text" placeholder="搜索任务..." 
                    class="w-full pl-10 pr-4 py-2 rounded-md border border-neutral-200 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary">
                <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-neutral-400"></i>
            </div>
            
            <!-- 右侧用户区域 -->
            <div class="flex items-center space-x-1 md:space-x-4">
                <!-- 通知按钮 -->
                <button class="relative p-2 rounded-full hover:bg-neutral-100 transition-all-300">
                    <i class="fa fa-bell-o text-lg text-neutral-600"></i>
                    <span class="absolute top-0 right-0 w-2 h-2 bg-danger rounded-full"></span>
                </button>
                
                <!-- 消息按钮 -->
                <button class="relative p-2 rounded-full hover:bg-neutral-100 transition-all-300 hidden md:block">
                    <i class="fa fa-envelope-o text-lg text-neutral-600"></i>
                    <span class="absolute top-0 right-0 w-2 h-2 bg-primary rounded-full"></span>
                </button>
                
                <!-- 用户头像 -->
                <div class="flex items-center space-x-2 ml-2">
                    <div class="w-8 h-8 bg-neutral-200 rounded-full overflow-hidden">
                        <img src="https://picsum.photos/id/1005/200/200" alt="用户头像" class="w-full h-full object-cover">
                    </div>
                    <span class="hidden md:block text-sm font-medium text-neutral-700">张三</span>
                </div>
            </div>
        </div>
    </header>

    <!-- 主体内容 -->
    <div class="flex pt-16 flex-1">
        <!-- 左侧导航菜单 -->
        <aside class="w-16 md:w-64 bg-white shadow-sm fixed h-full left-0 top-16 overflow-y-auto scrollbar-hide transform md:transform-none transition-transform duration-300 z-40 -translate-x-full md:translate-x-0">
            <nav class="py-4">
                <ul>
                    <!-- 主导航项 -->
                    <li class="mb-1">
                        <a href="index.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-tachometer text-lg"></i>
                            <span class="hidden md:block">首页</span>
                        </a>
                    </li>
                    
                    <!-- 交付流程模块 -->
                    <li class="mb-1">
                        <a href="business_strategy.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-line-chart text-lg"></i>
                            <span class="hidden md:block">业务战略</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="architecture-management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-sitemap text-lg"></i>
                            <span class="hidden md:block">架构管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="requirementsManagement.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-list-alt text-lg"></i>
                            <span class="hidden md:block">需求管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <div class="design-menu-wrapper">
                            <div class="flex items-center justify-between px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                                <a href="design_management.html" class="flex items-center space-x-3 flex-1" onclick="event.stopPropagation();">
                                    <i class="fa fa-paint-brush text-lg"></i>
                                    <span class="hidden md:block">设计管理</span>
                                </a>
                                <button id="design-menu-toggle" class="hidden md:block p-1 hover:bg-neutral-200 rounded transition-all" aria-label="展开/收起子菜单" onclick="event.stopPropagation();">
                                    <i class="fa fa-chevron-right text-xs transform transition-transform duration-300"></i>
                                </button>
                            </div>
                            <!-- 下拉子菜单 -->
                            <div id="design-submenu" class="hidden overflow-hidden transition-all duration-300 ease-in-out">
                                <div class="bg-neutral-50 py-1">
                                    <a href="interface_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-plug text-sm"></i>
                                        <span class="hidden md:block">接口管理</span>
                                    </a>
                                    <a href="model_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-cubes text-sm"></i>
                                        <span class="hidden md:block">模型管理</span>
                                    </a>
                                    <a href="data_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-database text-sm"></i>
                                        <span class="hidden md:block">字典管理</span>
                                    </a>
                                    <a href="ui_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-desktop text-sm"></i>
                                        <span class="hidden md:block">差异分析</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <li class="mb-1">
                        <a href="schedule_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-calendar text-lg"></i>
                            <span class="hidden md:block">排期管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="developmentMage.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-code text-lg"></i>
                            <span class="hidden md:block">开发管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <div class="test-menu-wrapper">
                            <div class="flex items-center justify-between px-4 py-3 text-primary bg-primary/5 border-r-4 border-primary">
                                <a href="testManagement.html" class="flex items-center space-x-3 flex-1" onclick="event.stopPropagation();">
                                    <i class="fa fa-bug text-lg"></i>
                                    <span class="hidden md:block font-medium">测试管理</span>
                                </a>
                                <button id="test-menu-toggle" class="hidden md:block p-1 hover:bg-neutral-200 rounded transition-all" aria-label="展开/收起子菜单" onclick="event.stopPropagation();">
                                    <i class="fa fa-chevron-right text-xs transform transition-transform duration-300"></i>
                                </button>
                            </div>
                            <!-- 下拉子菜单 -->
                            <div id="test-submenu" class="hidden overflow-hidden transition-all duration-300 ease-in-out">
                                <div class="bg-neutral-50 py-1">
                                    <a href="test_cases.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-file-text-o text-sm"></i>
                                        <span class="hidden md:block">测试案例</span>
                                    </a>
                                    <a href="test_plans.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-calendar-check-o text-sm"></i>
                                        <span class="hidden md:block">测试计划</span>
                                    </a>
                                    <a href="test_reports.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-bar-chart text-sm"></i>
                                        <span class="hidden md:block">测试报告</span>
                                    </a>
                                    <a href="test_global_settings.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-cogs text-sm"></i>
                                        <span class="hidden md:block">全局设置</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <li class="mb-1">
                        <a href="production_workflow.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-rocket text-lg"></i>
                            <span class="hidden md:block">投产上线</span>
                        </a>
                    </li>
                    
                    <!-- 新增的三个子菜单项 -->
                    <li class="mb-1">
                        <a href="quality_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-check-circle text-lg"></i>
                            <span class="hidden md:block">质量管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="security_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-shield text-lg"></i>
                            <span class="hidden md:block">安全管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="efficiency_metrics.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-bar-chart text-lg"></i>
                            <span class="hidden md:block">效能度量</span>
                        </a>
                    </li>
                    
                    <!-- 分隔线 -->
                    <li class="my-2">
                        <div class="border-t border-neutral-200 mx-4"></div>
                    </li>
                    
                    <!-- 公共模块 -->
                    <li class="mb-1">
                        <a href="teamManagement.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-users text-lg"></i>
                            <span class="hidden md:block">团队管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="settings.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-cog text-lg"></i>
                            <span class="hidden md:block">设置</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </aside>

        <!-- 主内容区域 -->
        <main class="flex-1 ml-16 md:ml-64 p-4 md:p-6 bg-neutral-100 min-h-screen">
            <!-- 面包屑导航 -->
            <div class="mb-6">
                <nav class="flex" aria-label="面包屑">
                    <ol class="inline-flex items-center space-x-1 md:space-x-3">
                        <li class="inline-flex items-center">
                            <a href="index.html" class="text-sm font-medium text-neutral-500 hover:text-primary">
                                <i class="fa fa-home mr-2"></i>首页
                            </a>
                        </li>
                        <li>
                            <i class="fa fa-chevron-right text-neutral-400 text-xs mx-2"></i>
                            <a href="testManagement.html" class="text-sm font-medium text-neutral-500 hover:text-primary">测试管理</a>
                        </li>
                        <li>
                            <i class="fa fa-chevron-right text-neutral-400 text-xs mx-2"></i>
                            <span class="text-sm font-medium text-neutral-700">测试案例</span>
                        </li>
                    </ol>
                </nav>
            </div>

            <!-- 页面标题 -->
            <div class="mb-6">
                <h1 class="text-2xl font-bold text-neutral-800 flex items-center">
                    <i class="fa fa-file-text-o text-primary mr-3"></i>
                    测试案例管理
                </h1>
                <p class="text-sm text-neutral-500 mt-2">管理和维护测试用例，支持用例的创建、编辑、执行和结果记录</p>
            </div>

            <!-- 操作栏 -->
            <div class="bg-white rounded-lg shadow-sm p-4 mb-6">
                <div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
                    <div class="flex flex-wrap gap-2">
                        <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-all">
                            <i class="fa fa-plus mr-2"></i>新建用例
                        </button>
                        <button class="px-4 py-2 bg-white border border-neutral-300 text-neutral-700 rounded-lg hover:bg-neutral-50 transition-all">
                            <i class="fa fa-upload mr-2"></i>导入
                        </button>
                        <button class="px-4 py-2 bg-white border border-neutral-300 text-neutral-700 rounded-lg hover:bg-neutral-50 transition-all">
                            <i class="fa fa-download mr-2"></i>导出
                        </button>
                    </div>
                    <div class="flex gap-2">
                        <input type="text" placeholder="搜索用例名称..." class="px-4 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary">
                        <button class="px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-all">
                            <i class="fa fa-search"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- 测试用例列表 -->
            <div class="bg-white rounded-lg shadow-sm overflow-hidden">
                <div class="overflow-x-auto">
                    <table class="w-full">
                        <thead class="bg-neutral-50 border-b border-neutral-200">
                            <tr>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">
                                    <input type="checkbox" class="rounded">
                                </th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">用例编号</th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">用例名称</th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">优先级</th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">状态</th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">创建人</th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">创建时间</th>
                                <th class="px-4 py-3 text-left text-xs font-medium text-neutral-500 uppercase tracking-wider">操作</th>
                            </tr>
                        </thead>
                        <tbody class="bg-white divide-y divide-neutral-200">
                            <tr class="hover:bg-neutral-50">
                                <td class="px-4 py-3"><input type="checkbox" class="rounded"></td>
                                <td class="px-4 py-3 text-sm text-neutral-700">TC-001</td>
                                <td class="px-4 py-3 text-sm text-neutral-700">用户登录功能测试</td>
                                <td class="px-4 py-3"><span class="px-2 py-1 text-xs rounded-full bg-danger/10 text-danger">高</span></td>
                                <td class="px-4 py-3"><span class="px-2 py-1 text-xs rounded-full bg-success/10 text-success">通过</span></td>
                                <td class="px-4 py-3 text-sm text-neutral-700">张三</td>
                                <td class="px-4 py-3 text-sm text-neutral-500">2024-01-15</td>
                                <td class="px-4 py-3">
                                    <div class="flex gap-2">
                                        <button class="text-primary hover:text-primary/80"><i class="fa fa-edit"></i></button>
                                        <button class="text-danger hover:text-danger/80"><i class="fa fa-trash"></i></button>
                                    </div>
                                </td>
                            </tr>
                            <tr class="hover:bg-neutral-50">
                                <td class="px-4 py-3"><input type="checkbox" class="rounded"></td>
                                <td class="px-4 py-3 text-sm text-neutral-700">TC-002</td>
                                <td class="px-4 py-3 text-sm text-neutral-700">数据查询接口测试</td>
                                <td class="px-4 py-3"><span class="px-2 py-1 text-xs rounded-full bg-warning/10 text-warning">中</span></td>
                                <td class="px-4 py-3"><span class="px-2 py-1 text-xs rounded-full bg-neutral-200 text-neutral-600">待执行</span></td>
                                <td class="px-4 py-3 text-sm text-neutral-700">李四</td>
                                <td class="px-4 py-3 text-sm text-neutral-500">2024-01-16</td>
                                <td class="px-4 py-3">
                                    <div class="flex gap-2">
                                        <button class="text-primary hover:text-primary/80"><i class="fa fa-edit"></i></button>
                                        <button class="text-danger hover:text-danger/80"><i class="fa fa-trash"></i></button>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </main>
    </div>

    <script>
        // 移动端菜单切换
        const menuToggle = document.getElementById('menuToggle');
        const aside = document.querySelector('aside');
        
        if (menuToggle && aside) {
            menuToggle.addEventListener('click', function() {
                aside.classList.toggle('-translate-x-full');
            });
        }

        // 设计管理菜单展开/收起功能
        document.addEventListener('DOMContentLoaded', function() {
            const designMenuToggle = document.getElementById('design-menu-toggle');
            const designSubmenu = document.getElementById('design-submenu');
            const designMenuWrapper = document.querySelector('.design-menu-wrapper');
            
            if (designMenuToggle && designSubmenu) {
                designMenuToggle.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.querySelector('i').classList.toggle('rotate-90');
                    if (designSubmenu.classList.contains('hidden')) {
                        designSubmenu.classList.remove('hidden');
                        setTimeout(() => {
                            designSubmenu.classList.remove('opacity-0');
                        }, 10);
                    } else {
                        designSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            designSubmenu.classList.add('hidden');
                        }, 300);
                    }
                });
                
                // 点击菜单项外部区域收起菜单
                document.addEventListener('click', function(e) {
                    if (designMenuWrapper && !designMenuWrapper.contains(e.target)) {
                        designSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            designSubmenu.classList.add('hidden');
                        }, 300);
                        if (designMenuToggle.querySelector('i')) {
                            designMenuToggle.querySelector('i').classList.remove('rotate-90');
                        }
                    }
                });
            }
            
            // 测试管理菜单展开/收起功能
            const testMenuToggle = document.getElementById('test-menu-toggle');
            const testSubmenu = document.getElementById('test-submenu');
            const testMenuWrapper = document.querySelector('.test-menu-wrapper');
            
            if (testMenuToggle && testSubmenu) {
                testMenuToggle.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.querySelector('i').classList.toggle('rotate-90');
                    if (testSubmenu.classList.contains('hidden')) {
                        testSubmenu.classList.remove('hidden');
                        setTimeout(() => {
                            testSubmenu.classList.remove('opacity-0');
                        }, 10);
                    } else {
                        testSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            testSubmenu.classList.add('hidden');
                        }, 300);
                    }
                });
                
                // 点击菜单项外部区域收起菜单
                document.addEventListener('click', function(e) {
                    if (testMenuWrapper && !testMenuWrapper.contains(e.target)) {
                        testSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            testSubmenu.classList.add('hidden');
                        }, 300);
                        if (testMenuToggle.querySelector('i')) {
                            testMenuToggle.querySelector('i').classList.remove('rotate-90');
                        }
                    }
                });
            }
        });
    </script>
</body>
</html>
